﻿//Модель - документы за день
Ext.define('model.DayDocument', {
    extend: 'Ext.data.Model',
    fields: [
                { name: 'iTransportDay', type: 'int' },
                { name: 'OwnerID' },
                { name: 'DocID' },
                { name: 'Part', type: 'int' },
                { name: 'Notification.NotificationNumber' },
                { name: 'PublicFileName'},
                { name: 'FileName' },
                { name:'GetFullID'},
                { name: 'TagInfo' },
                { name: 'AttachTables' },
                { name: 'FirstStepIsOK' }
            ],
    idProperty: 'GetFullID'
});

//Хранилище - документы за день
Ext.define('store.DayDocument', {
    extend: 'Ext.data.Store',
    model: 'model.DayDocument',
    pageSize:5,
    proxy: new Ext.data.HttpProxy({    
        headers: { 'Content-type': 'application/json' },
        reader: { root: 'd' },
         api: {            
                  read: '/AdministrationPort.ashx/GetDayDocuments',
                  update: '/AdministrationPort.ashx/UpdateStateDocumentMetaItem'
                }
    })
});
